<?php
use think\Route;

Route::rule('category/:dirs', 'index/Category/index', 'GET');   //栏目
Route::rule('detail/:dirs/:id', 'index/Detail/index', 'GET');   //文章


Route::get('login', 'index/login/index', 'GET'); 
Route::get('loginout', 'index/login/loginout', 'GET'); 
Route::post('dologin', 'index/login/dologin', 'POST');    
// Route::get('register', 'index/login/register', 'GET');  
// Route::post('doregister', 'index/login/doregister', 'POST');  

Route::get('member', 'index/member/index', 'GET'); 


//Route::rule('/[:cateid]', 'index/index/index', 'GET', ['cateid' => '\d+']); 

Route::get([
    '/:cateid'      =>['index/index/index',[],['cateid'=>'\d+']],
    '/detail/[:id]' =>['index/index/detail',[],['id'=>'\d+']],
    '/order/[:id]'  =>['index/index/order',[],['id'=>'\d+']],
    '/aplay/[:id]'  =>['index/index/aplay',[],['id'=>'\d+']],
    '/weixin/[:id]' =>['index/index/weixin',[],['id'=>'\d+']],
    '/myorder'      =>['index/Member/order'],
    '/myscore'      =>['index/Member/score'],
    '/loginouts'    =>['index/login/loginouts'],
    '/mylong'       =>['index/Member/long'],
    '/subordinate'  =>['index/Member/subordinate'],
    '/success/[:id]'=>['index/index/success']
]);

Route::post('/addorder', 'index/index/addorder','POST'); 
Route::post('/changeorder', 'index/index/changeorder','POST'); 
Route::post('/pay', 'index/index/pay','POST'); 
Route::post('/edit', 'index/member/edit','POST'); 
Route::post('/del', 'index/member/del','POST'); 
Route::post('/wxnotify', 'index/index/wxnotify','POST'); 

Route::post('/upload', 'index/member/upload'); 



Route::any('/wxnotify', 'index/index/wxnotify'); 
//api2.0
return [
        'api/flink/demo'           => 'api/flink/demo',               //测试友情链接自定义接口
        '__rest__'=>[
                'api/archive'       => 'api/archive',
                'api/flink'         => 'api/flink',
        ],
];